package com.atwisdom.star.common.vo;

public enum ListenerInstanceType {
    //操作
    ENTITY("entity","实体实例"),
    ENTITY_RELATION("entityRelation","关系实例");

    //容器
    private String code;

    private String description;

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    public static ListenerInstanceType getByCode(String code){
        for (ListenerInstanceType constants : values()) {
            String curCode = constants.getCode();
            if (curCode.equalsIgnoreCase(code)) {
                return constants;
            }
        }
        return ENTITY;
    }

    private ListenerInstanceType(String code, String description){
        this.code = code;
        this.description = description;
    }
}
